package com.ruoyi.users.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户基础对象 users
 *
 * @author cyz
 * @date 2025-07-09
 */
public class Users extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long id;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 加密密码 */
    @Excel(name = "加密密码")
    private String password;

    /** 1-学生 2-家长 */
    @Excel(name = "1-学生 2-家长")
    private Long userType;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 0-禁用 1-正常 */
    @Excel(name = "0-禁用 1-正常")
    private Long status;

    /** 违规次数 */
    @Excel(name = "违规次数")
    private Long violationCount;

    /** 最后警告时间 */
    @JsonFormat(pattern = "yyyy/MM/DD HH:mm:ss")
    @Excel(name = "最后警告时间", width = 30, dateFormat = "yyyy/MM/DD HH:mm:ss")
    private Date lastWarningTime;

    /** $column.columnComment */
    @Excel(name = "创建时间", readConverterExp = "$column.readConverterExp()")
    private Date createdAt;

    /** $column.columnComment */
    @Excel(name = "修改时间", readConverterExp = "$column.readConverterExp()")
    private Date updatedAt;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }

    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }

    public void setUserType(Long userType)
    {
        this.userType = userType;
    }

    public Long getUserType()
    {
        return userType;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getEmail()
    {
        return email;
    }

    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }

    public void setViolationCount(Long violationCount)
    {
        this.violationCount = violationCount;
    }

    public Long getViolationCount()
    {
        return violationCount;
    }

    public void setLastWarningTime(Date lastWarningTime)
    {
        this.lastWarningTime = lastWarningTime;
    }

    public Date getLastWarningTime()
    {
        return lastWarningTime;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("password", getPassword())
            .append("userType", getUserType())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("status", getStatus())
            .append("violationCount", getViolationCount())
            .append("lastWarningTime", getLastWarningTime())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
